package cn.tedu.travelsystem.travelDownload.mapper;

import org.apache.ibatis.annotations.*;

@Mapper
public interface UserAvatarMapper {
    @Update("UPDATE user SET avatar = #{avatarPath} WHERE user_id = #{userId}")
    int updateAvatar(@Param("userId") Integer userId,
                     @Param("avatarPath") String avatarPath);

    @Select("SELECT avatar FROM user WHERE user_id = #{userId}")
    String getAvatarPath(Integer userId);
}